<table width="100%" class="etable">
	<tr>
		<td width="100px">名称：</td>
		<td><input name="name" type="text" size="38" id="name" value="<{$row.name}>"><p>必填</p></td>
	</tr>  
	<tr>
		<td>标签名：</td>
		<td><input name="alias" type="text" size="38" id="alias" value="<{$row.alias}>"/></td>
	</tr> 
	<tr>
		<td>参数：</td>
		<td><input name="param" type="text" size="38" id="param" value="<{$row.param}>"></td>
	</tr> 
	<tr>
		<td>状态：</td>
		<td>
			<label><input name="status" type="radio" value="1" id="status" <{if $row.status == '1' || $smarty.get.cid == ''}>checked="checked"<{/if}> class="status"/> 开启</label>&nbsp; &nbsp; 
			<label><input name="status" type="radio" value="0" id="status" <{if $row.status == '0'}>checked="checked"<{/if}> class="status"/> 关闭</label>
		</td>
	</tr>
</table> 
<script type="text/javascript">
function ajax_submit(){  
	var name = $("#name").val();
	var alias = $("#alias").val(); 
	var param = $("#param").val();
	var status = $('input[name="status"]:checked').val(); 
	if(name == ''){
		alert('名称不能为空'); return false;
	} 
	$.ajax({
		type: 'POST',
		url: '?m=api&a=notice_type_save', 
		data: {<{if $row.id}>id:<{$row.id}>, <{/if}> name:name, alias:alias, param:param, status:status},
		success: function(result){
			var data = jQuery.parseJSON(result); 
			if(data.error == '0'){
				parent.ajax_flush();
				parent.ajax_close();
			}else{
				alert(data.msg);
			} 
		}
	});  
}
</script>